<?php

class aoiFrontBookingVerifyAction extends sfAction {
	public function execute($request)
  {
    $this->ref = $request->getParameter('ref');
		if($request->hasParameter('reservation_ref') && $request->hasParameter('reservation_name'))
    {
      return $this->showReservation($request->getParameter('reservation_ref'), $request->getParameter('reservation_name'));
    }
	}

  public function showReservation($reservation_ref)
  {
    $this->reservation_ref = $reservation_ref;
    $this->reservation = Doctrine_Core::getTable('AoiItineraryReservation')->findOneByRefCode($reservation_ref);
    if($this->reservation) return 'ShowReservation';
    else
    {
      // back to form
      return 'Success';
    }
  }
}